package com.work.demo.juctest;

import cn.hutool.json.JSONUtil;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName : ThreadPoolDemo
 * @Description : 线程池示例
 * @Author : LinYa
 * @Date: 2021/11/17  10:47
 */
public class ThreadPoolDemo {


	public static void main(String[] args) {
//		ExecutorService executorService1 = Executors.newCachedThreadPool();
//		ExecutorService executorService2 = Executors.newFixedThreadPool(10);
//		ExecutorService executorService3 = Executors.newSingleThreadExecutor();
//
//		for (int i = 0; i <100 ; i++) {
//			executorService3.execute(new MyTask(i));
//		}
//		executorService3.shutdown();
//
//
//		new Thread(()->{
//			System.out.println("654654654");
//		}).run();
//
//
//		new Thread(()-> System.out.println("654654654")).start();
//		String key = null;
//		boolean b = StringUtils.isNotBlank(key);
//		System.out.println(b);
//		Assert.isTrue(b, "key不能为空");

		Map<String, CMBChunkInfo> map = new HashMap<>(10);

		CMBChunkInfo info = new CMBChunkInfo();
		info.setChunk_begin(10);
		info.setChunk_end(10);
		info.setChunk_index(10);
		info.setFid("10");
		for (int i = 0; i < 10; i++) {

			map.put(String.valueOf(i), info);
		}

		System.out.println(JSONUtil.toJsonStr(map));

	}

}
